<text>This web illustrates Hebbian learning and the use of a delta rule for pattern association between two four element vectors A and B, using an interconnection matrix W.
a1 a2 a3 a4
w11 w12 w13 w15 b1
w21 w22 w23 w24 b2
w31 w32 w33 w34 b3
w41 w42 w43 w44 b4
For any collection of weights (wij's) and inputs (aj's), a collection of outputs (bj's) may be computed according to the formula:
1) bj=a1*w1j+a2*w2j+a3*w3j+a4*w4j, j=1..4
For a given input vector A, it is possible to 'teach' the associator to produce an output vector B, which is arbitrarily close to a target vector T. This may be done in the following way:
a) Set the values aj of the input vector A
b) Set the values ti of the target vector T
( Steps a) and b) may be done by going to the cell named 'input', setting its text field to the desired row vectors A and T (four a numbers followed by four t numbers), and selecting execute from the Special menu. )
c) Set the formulae of the weights to the expression:
wij=wij+ai*(tj-bj)/k ( delta rule)
( this has already been done)
d) Set the values of the weights wij to random or
to similar small values.
( Position to the cell RandomizeWeights and execute its script to accomplish this task)
e) Compute a trial set of output values using equation 1).
( Execute the script of cell ComputeBs to perform this computation. )
f) Recompute the weights wij according to the delta rule.
( Execute the script of cell ComputeWs to recompute the weights )
g) Repet steps e) and f) until the output vector B is as close to the target vector T as you desire.
(Each time it is executed, the script of this 'home' cell will repeat steps e) and f) 25 times, and ouput a comparison between the B vector and T vector.)